﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IList<Customer>>" %>
<%@ Import Namespace="WorkOrders.Domain.Entities"%>

<asp:Content ID="indexTitle" ContentPlaceHolderID="TitleContent" runat="server">
    Home Page
</asp:Content>

<asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2>Customers</h2>
    <p>
        <%= Html.ActionLink("New customer", "Create") %>
    </p>
    <table>
        <% foreach (var customer in Model){ %>
            <tr>
                <td><%= Html.ActionLink("Assign work order", "Assign", new { id=customer.Id }) %></td>
                <td><%= Html.Encode(customer.Details) %></td>
                <td><%= Html.Encode(customer.Status) %></td>
            </tr>
        <%} %>
    </table>
</asp:Content>
